package com.kk.xhr.admin.biz;

import com.kk.xhr.admin.controller.request.ApplyQueryRequest;
import com.kk.xhr.admin.controller.request.ApplyUpdateRequest;
import com.kk.xhr.admin.controller.request.ComplementSignAddRequest;
import com.kk.xhr.admin.controller.request.SignQueryRequest;
import com.kk.xhr.admin.controller.vo.ComplementSignVO;
import com.kk.xhr.admin.controller.vo.SignVo;
import com.kk.xhr.web.vo.PageVO;

import java.time.LocalDateTime;

/**
 * 签到biz接口
 *
 * @author luokexiong
 * @version 1.0 2021/2/18
 * @since 1.0.0
 */
public interface ISignBizService {

    /**
     * 分页查询我的考勤
     *
     * @param userId  用户id
     * @param request SignQueryRequest
     * @return SignVo
     */
    PageVO<SignVo> queryPage(Long userId, SignQueryRequest request);

    /**
     * 分页查询补签记录
     *
     * @param request ApplyQueryRequest
     * @return ComplementSignVO
     */
    PageVO<ComplementSignVO> queryPage(Long userId, ApplyQueryRequest request);

    /**
     * 分页查询补签记录
     *
     * @param request ApplyQueryRequest
     * @return ComplementSignVO
     */
    PageVO<ComplementSignVO> queryPageCheck(Long userId, ApplyQueryRequest request);

    /**
     * 签到
     *
     * @param userId 用户id
     * @param now    当前时间
     */
    void sign(Long userId, LocalDateTime now);

    /**
     * 补签申请
     *
     * @param userId 用户id
     */
    void complementSign(Long userId, ComplementSignAddRequest request);

    /**
     * 审核申请
     *
     * @param request ApplyUpdateRequest
     */
    void checkApply(Long userId, ApplyUpdateRequest request);

    /**
     * 生成日考勤报告，用于定时任务
     *
     * @param userId 用户id
     */
    void generateReportOfDay(Long userId);

    /**
     * 生成月考勤报告，用于定时任务
     *
     * @param userId 用户id
     */
    void generateReportOfMouth(Long userId);
}
